package com.study;

/*
*  获取类对象的方式：三种方式。
*       类名.class
*       对象.getClass();
*       Class.forName(“类完整路径”)  // com.study.Student
*
* */
public class Demo1 {
    public static void main(String[] args) {
        Class<Student> studentClass1 = Student.class;
        System.out.println(studentClass1);
        try {
            Class<?> aClass = Class.forName("com.study.Student");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

        Student s1 = new Student();
        Class<? extends Student> aClass = s1.getClass();

        System.out.println(studentClass1.getClassLoader());
        System.out.println(aClass.getClassLoader());
    }
}
